<?php 
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
 */

$oscTemplate->buildBlocks();

if (!$oscTemplate->hasBlocks('boxes_column_left')) {
    $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
}

if (!$oscTemplate->hasBlocks('boxes_column_right')) {
    $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
}
?><html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
        <title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>
        <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
       <link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.6.css" />        
	
         <script type="text/javascript" src="ext/jquery/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script>

        <script type="text/javascript" src="ext/jwplayer/jwplayer.js"></script>
        
<link type='text/css' href='ext/brand_drop/page_nav.css' rel='stylesheet'>        
      <?php /*
            if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {
                ?>
                <script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script>
                <script type="text/javascript">
                   $.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);
                </script>
                <?php
            } */
            ?>
<script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />
<script type="text/javascript" src="ext/jquery/jquery.selectbox/js/jquery.selectbox-0.1.3.min.js"></script>
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
       
<script type="text/javascript" src="ext/slider_thumb/jquery.slideViewerPro.1.5.js"></script>
<script type="text/javascript" src="ext/slider_thumb/jquery.timers.js"></script>

<script type="text/javascript" src="ext/slider_thumb/jquery.lightbox-0.5.js"></script>
<link rel="stylesheet" type="text/css" href="ext/slider_thumb/jquery.lightbox-0.5.css" media="screen" />                        
<script type="text/javascript" src="jquery/jRating.jquery.js"></script>
  <link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" />
  
<link rel="stylesheet" type="text/css" href="ext/slider_thumb/svwp_style.css" />
            
            
<link rel="stylesheet" type="text/css" href="stylesheet.css" />

<link rel="stylesheet" href="jquery/jRating.jquery.css" type="text/css" />
<script language="javascript" type="text/javascript">
function sortBy(i)
{   
    document.filter.sortby.value = i; 	
	document.filter.submit();
}

function get_brand(name,id)
{
 $("#login-trigger").html(name+'<span>&#x25BC;</span>');
 $("input#manufacturers_id").val(id);
 $("#login-trigger").next('#login-content').slideToggle();
	
 var b_id = $("input#manufacturers_id").val();	

 $(this).toggleClass('active');					
					
 if ($(this).hasClass('active')) $(this).find('span').html('&#x25B2;')
 else $(this).find('span').html('&#x25BC;');
 
  var cid = $("input#cid").val();
  var cPath = $("input#cPath").val();
  
$.post("<?php echo HTTP_SERVER;?>/catalog/list_product_brand.php?categories_id="+cid+"&manufacturers_id="+b_id+"&cPath="+cPath,

        function(data) {                                    
		$("#bodyContent").html(data);							
       });					   						   

	 
 return false;
}

</script>
                                             
<script type="text/javascript">
    $(document).ready(function(){
				
    $('#login-trigger').click(function(){
					$(this).next('#login-content').slideToggle();
					$(this).toggleClass('active');					
					
					if ($(this).hasClass('active')) $(this).find('span').html('&#x25B2;')
						else $(this).find('span').html('&#x25BC;')
					})
	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("#ultabs a:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("#ultabs a").click(function() {
		$("#ultabs a").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).attr("href"); //Find the rel attribute value to identify the active tab + content find("a").
		
	    $(activeTab).fadeIn(); //Fade in the active content
		return false;
	});				
           
		   $('.star_rating').jRating({
                                /*type:'small',*/
                                isDisabled : true,
                                length : 5,
                                decimalLength : 1,
                                rateMax : 5
                    });
                });                
			 
			 $(function() {
                    $('#player_images a').lightBox();
                });			 
                    //BOF - slider thumbs

            var root_website_domain = "<?php echo HTTP_SERVER.DIR_WS_HTTP_CATALOG;?>";            
            $(window).bind("load", function() {
                $("div#piGalNew").slideViewerPro({
                    thumbs: 6, 
                    /*thumbsPercentReduction: 18,*/
                    galBorderWidth: 1,
                    galBorderColor: "#e3e3e3",
                    thumbsTopMargin: 10,
                    thumbsRightMargin: 10,
                    thumbsBorderWidth: 1,
                    thumbsActiveBorderColor: "#3d3d3d",
                    thumbsActiveBorderOpacity: 0.8,
                    thumbsBorderOpacity: 1,
                leftButtonInner: "<img src='"+ root_website_domain +"ext/slider_thumb/images/larw.gif' />",
               rightButtonInner: "<img src='"+ root_website_domain +"ext/slider_thumb/images/rarw.gif' />",
                    autoslide: false, 
                    typo: false
                });	
            });            
            //EOF - slider thumbs       
            // BOF - calculator charges
            function calculator_charges(dec, error_message){ 
                  				             
                if($('#quantityPur').val()==''){
                    quantity = 0;
                }
				else { quantity =  $('#quantityPur').val(); }
		
                if(isNaN(quantity)){
                    alert(error_message);
                    return false;
				}
				
                var charge = $('#products_charges').val(); 
				
                if($('#products_charges').val()==''){
                    charge = 0;
                }
				else { charge = $('#products_charges').val(); }								
							
                var new_charge = (parseInt(quantity)) * (parseFloat(charge));
                $('span#display_changes').html(new_charge.toFixed(dec));
                return false;
            }
            // EOF - calculator charges     
         /*function play_video(){                    
                    $("div#div_icon_vdeo").hide();  
                    $("ul#player_images").hide();  
                    var content_video = $("div#host_player_video").html(); 
                    $("div#player_video").html(content_video);  
                    $("div#player_video").show();  
                }
                
                function play_images(){
                    $("div#div_icon_vdeo").show();  
                    $("ul#player_images").show();  
                    $("div#player_video").hide();  
                    $("div#player_video").html('');  
                }*/
                setInterval(checkScreen, 1);
                checkScreen();
                function checkScreen(){
                    if ( $(window).width() < 1149 ){
                       $("#headerShortcuts").css({                            
                            "color": "#2e2e2e",
                            "text-align": "right",
                            "margin": "0 auto 0 auto",
                        });
						
                        $("#bodyWrapper").css({
                            "width": "auto",
                            "max-width": "975px",
                            "margin": "0 auto 0 auto",
                            "position": "relative",
                            "border-width": "0 1px 0 1px",
                            "border-style": "solid",
                            "border-color": "#efefef",
                            "background": "#ffffff"
                        });
                        $("#mainWrapper").css({
                            "width": "auto",
                            "margin": "0 auto",
                            "background": "none",
                        });
                    } else {
                        $("#mainWrapper").css({
                            "width":"1149px",
                            "margin": "0 auto",
                            "background": "url(/images/layout/main-back.png) repeat-y"
                        });
                        $("#bodyWrapper").css({
                            "width": "975px",
                            "margin": "0 auto 0 90px",
                            "position": "relative",
                            "border": "none"
                        });                       
                    }
                }
            </script>
            <!--[if IE]>
             <link rel="stylesheet" type="text/css" href="stylesheet-ie.css" />
            <![endif]-->
        
        <?php echo $oscTemplate->getBlocks('header_tags'); ?>

        <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>

<!--[if lte IE 7]>
<style type="text/css">
h2 a, .demo {position:relative; height:1%}
</style>
<![endif]-->

<!--[if lte IE 6]>
<script type="text/javascript">
   try { document.execCommand( "BackgroundImageCache", false, true); } catch(e) {};
</script>
<![endif]-->
<!--[if !lt IE 6]><!-->

<script type="text/javascript" src="ext/expand/scripts/expand.js"></script> 

    </head>
    <body>

        <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?>">

            <?php
// BOF: Store Mode
// Hide header.php if not to show
            if (((HEADER_OFF == 'false') && (strstr($PHP_SELF, MAINTENANCE_FILENAME))) || (!strstr($PHP_SELF, MAINTENANCE_FILENAME))) {
                require(DIR_WS_INCLUDES . 'header.php');
            }
// EOF: Store Mode
            ?>

            <div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">

                <!-- include google translation -->
                <script>
                    function googleSectionalElementInit() {
                        new google.translate.SectionalElement({
                            sectionalNodeClassName: 'goog-trans-section',
                            controlNodeClassName: 'goog-trans-control',
                            background: 'transparent'
                        }, 'google_sectional_element');
                    }
                </script> 
<script src="http://translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=es"></script>
